
/***************************************************************************
 *                    __            __ _ ___________                       *
 *                    \ \          / /| |____   ____|                      *
 *                     \ \        / / | |    | |                           *
 *                      \ \  /\  / /  | |    | |                           *
 *                       \ \/  \/ /   | |    | |                           *
 *                        \  /\  /    | |    | |                           *
 *                         \/  \/     |_|    |_|                           *
 *                                                                         *
 *                           Wiimms ISO Tools                              *
 *                         http://wit.wiimm.de/                            *
 *                                                                         *
 ***************************************************************************
 *                                                                         *
 *   This file is part of the WIT project.                                 *
 *   Visit http://wit.wiimm.de/ for project details and sources.           *
 *                                                                         *
 *   Copyright (c) 2009-2012 by Dirk Clemens <wiimm@wiimm.de>              *
 *                                                                         *
 ***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt       *
 *                                                                         *
 ***************************************************************************
 *                                                                         *
 *   >>>  This file is automatically generated by './src/gen-ui.c'.  <<<   *
 *   >>>                   Do not edit this file!                    <<<   *
 *                                                                         *
 ***************************************************************************/

#include <getopt.h>
#include "ui-wfuse.h"

//
///////////////////////////////////////////////////////////////////////////////
///////////////                  OptionInfo[]                   ///////////////
///////////////////////////////////////////////////////////////////////////////

const InfoOption_t OptionInfo[OPT__N_TOTAL+1] =
{
    {0,0,0,0,0}, // OPT_NONE,

    {	OPT_VERSION, 'V', "version",
	0,
	"Stop parsing the command line, print a version info and exit."
    },

    {	OPT_HELP, 'h', "help",
	0,
	"Stop parsing the command line, print a help message and exit."
    },

    {	OPT_XHELP, 0, "xhelp",
	0,
	"Same as --help."
    },

    {	OPT_HELP_FUSE, 'H', "help-fuse",
	0,
	"Stop parsing the command line and print a FUSE help message."
    },

    {	OPT_WIDTH, 0, "width",
	"width",
	"Define the width (number of columns) for help and some other messages"
	" and disable the automatic detection of the terminal width."
    },

    {	OPT_QUIET, 'q', "quiet",
	0,
	"Be quiet and print only error messages."
    },

    {	OPT_VERBOSE, 'v', "verbose",
	0,
	"Be verbose and print more progress information."
    },

    {	OPT_IO, 0, "io",
	"flags",
	"Setup the IO mode for experiments. The standard file IO is based on"
	" open() function. The value '1' defines that WBFS IO is based on"
	" fopen() function. The value '2' defines the same for ISO files and"
	" value '4' for WIA files. You can combine the values by adding them."
    },

    {	OPT_OPTION, 'o', "option",
	"param",
	"This option is forwarded to FUSE command line scanner as '-o param'."
    },

    {	OPT_PARAM, 'p', "param",
	"param",
	"The parameter is forwarded to the FUSE command line scanner."
    },

    {	OPT_CREATE, 'c', "create",
	0,
	"If the mount point does not exist, create it and remove it on"
	" unmount."
    },

    {	OPT_REMOUNT, 'r', "remount",
	0,
	"If the mount point is already mounted, try silently to unmount it"
	" first."
    },

    {	OPT_UMOUNT, 'u', "umount",
	0,
	"Enter 'unmount mode' and unmount each entered directory by calling"
	" 'fusermount -u mountdir' or alternatively 'umount mountdir'."
    },

    {	OPT_LAZY, 'l', "lazy",
	0,
	"Lazy unmount: Detach the mounted file system from the file system"
	" hierarchy now, and cleanup all references to the file system as soon"
	" as it is not busy anymore."
    },

    {0,0,0,0,0} // OPT__N_TOTAL == 15

};

//
///////////////////////////////////////////////////////////////////////////////
///////////////            OptionShort & OptionLong             ///////////////
///////////////////////////////////////////////////////////////////////////////

const char OptionShort[] = "VhHqvo:p:crul";

const struct option OptionLong[] =
{
	{ "version",		0, 0, 'V' },
	{ "help",		0, 0, 'h' },
	{ "xhelp",		0, 0, GO_XHELP },
	{ "help-fuse",		0, 0, 'H' },
	 { "helpfuse",		0, 0, 'H' },
	{ "width",		1, 0, GO_WIDTH },
	{ "quiet",		0, 0, 'q' },
	{ "verbose",		0, 0, 'v' },
	{ "io",			1, 0, GO_IO },
	{ "option",		1, 0, 'o' },
	{ "param",		1, 0, 'p' },
	{ "create",		0, 0, 'c' },
	{ "remount",		0, 0, 'r' },
	{ "umount",		0, 0, 'u' },
	 { "unmount",		0, 0, 'u' },
	{ "lazy",		0, 0, 'l' },

	{0,0,0,0}
};

//
///////////////////////////////////////////////////////////////////////////////
///////////////            OptionUsed & OptionIndex             ///////////////
///////////////////////////////////////////////////////////////////////////////

u8 OptionUsed[OPT__N_TOTAL+1] = {0};

const u8 OptionIndex[OPT_INDEX_SIZE] = 
{
	/* 0x00   */	 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
	/* 0x10   */	 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
	/* 0x20   */	 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
	/* 0x30   */	 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
	/* 0x40   */	 0,0,0,0, 0,0,0,0, 
	/* 0x48 H */	OPT_HELP_FUSE,
	/* 0x49   */	 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,
	/* 0x56 V */	OPT_VERSION,
	/* 0x57   */	 0,0,0,0, 0,0,0,0, 0,0,0,0, 
	/* 0x63 c */	OPT_CREATE,
	/* 0x64   */	 0,0,0,0, 
	/* 0x68 h */	OPT_HELP,
	/* 0x69   */	 0,0,0,
	/* 0x6c l */	OPT_LAZY,
	/* 0x6d   */	 0,0,
	/* 0x6f o */	OPT_OPTION,
	/* 0x70 p */	OPT_PARAM,
	/* 0x71 q */	OPT_QUIET,
	/* 0x72 r */	OPT_REMOUNT,
	/* 0x73   */	 0,0,
	/* 0x75 u */	OPT_UMOUNT,
	/* 0x76 v */	OPT_VERBOSE,
	/* 0x77   */	 0,0,0,0, 0,0,0,0, 0,
	/* 0x80   */	OPT_XHELP,
	/* 0x81   */	OPT_WIDTH,
	/* 0x82   */	OPT_IO,
	/* 0x83   */	 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,
	/* 0x90   */	 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
	/* 0xa0   */	 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
	/* 0xb0   */	 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
	/* 0xc0   */	 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
	/* 0xd0   */	 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
	/* 0xe0   */	 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
	/* 0xf0   */	 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
};

//
///////////////////////////////////////////////////////////////////////////////
///////////////                 InfoOption tabs                 ///////////////
///////////////////////////////////////////////////////////////////////////////

const InfoOption_t * option_tab_tool[] =
{
	OptionInfo + OPT_VERSION,
	OptionInfo + OPT_HELP,
	OptionInfo + OPT_XHELP,
	OptionInfo + OPT_HELP_FUSE,
	OptionInfo + OPT_WIDTH,
	OptionInfo + OPT_QUIET,

	OptionInfo + OPT_NONE, // separator

	OptionInfo + OPT_OPTION,
	OptionInfo + OPT_PARAM,
	OptionInfo + OPT_CREATE,
	OptionInfo + OPT_REMOUNT,

	OptionInfo + OPT_NONE, // separator

	OptionInfo + OPT_UMOUNT,
	OptionInfo + OPT_LAZY,

	0
};


//
///////////////////////////////////////////////////////////////////////////////
///////////////                   InfoCommand                   ///////////////
///////////////////////////////////////////////////////////////////////////////

const InfoCommand_t CommandInfo[CMD__N+1] =
{
    {	0,
	false,
	false,
	"wfuse",
	0,
	"wfuse [option]... source mountdir\n"
	"wfuse --umount mountdir...",
	"Mount a Wii or GameCube image or a WBFS file or partition to a mount"
	" point using FUSE (Filesystem in USErspace). Use 'wfuse --umount"
	" mountdir' for unmounting.",
	12,
	option_tab_tool,
	0
    },

    {0,0,0,0,0,0,0,0,0}
};

//
///////////////////////////////////////////////////////////////////////////////
///////////////                     InfoUI                      ///////////////
///////////////////////////////////////////////////////////////////////////////

const InfoUI_t InfoUI =
{
	"wfuse",
	0, // n_cmd
	0, // cmd_tab
	CommandInfo,
	0, // n_opt_specific
	OPT__N_TOTAL,
	OptionInfo,
	OptionUsed,
	OptionIndex,
	OptionShort,
	OptionLong
};

//
///////////////////////////////////////////////////////////////////////////////
///////////////                       END                       ///////////////
///////////////////////////////////////////////////////////////////////////////

